SET(LIB_NAME osgdb_osgAudio)
#SET(HEADER_PATH "${osgAudio_SOURCE_DIR}/include/${LIB_NAME}")
SET(OSGAUDIO_USER_DEFINED_DYNAMIC_OR_STATIC MODULE)

#SET(LIB_PUBLIC_HEADERS ...)

ADD_LIBRARY(
    ${LIB_NAME}
    ${OSGAUDIO_USER_DEFINED_DYNAMIC_OR_STATIC}
    #${LIB_PUBLIC_HEADERS}
    IO_OccludeCallback.cpp
    IO_SoundNode.cpp
    IO_SoundRoot.cpp
    IO_SoundState.cpp
    IO_SoundUpdateCB.cpp
)


add_definitions( 
  -DOSGPLUGINOSGAUDIO_EXPORTS
  # -DWIN32
  # -D_DEBUG
  # -D_USRDLL
  # -D_WINDOWS
)

INCLUDE_WITH_VARIABLES( ${LIB_NAME} ${SUBSYSTEM_INCLUDES} )
INCLUDE_DIRECTORIES( ${OSG_INCLUDE_DIRS} )
LINK_WITH_VARIABLES( ${LIB_NAME} ${SUBSYSTEM_LINKS} )
TARGET_LINK_LIBRARIES( ${LIB_NAME} ${OSG_LIBRARIES} )
TARGET_LINK_LIBRARIES( ${LIB_NAME} osgAudio ${SUBSYSTEM_TARGET_LINKS} )

IF(MSVC_IDE)
    # Ugly workaround to remove the "/debug" or "/release" in each output
#    SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX "../")
#    SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES IMPORT_PREFIX "../")
ENDIF()
    
INCLUDE(ModuleInstall OPTIONAL)
